//
//  StatusNormalCell.swift
//  Weibo
//
//  Created by apple on 15/12/14.
//  Copyright © 2015年 idcast. All rights reserved.
//

import UIKit
//原创微博 cell
class StatusNormalCell: StatusCell {
    
    ///微博视图模型
   override var viewModel: StatusViewModel? {
        didSet {
            pictureView.snp_updateConstraints { (make) -> Void in
                
                //根据配图数量决定配图试图的顶部间距
                let offset = viewModel?.thumbnailUrks?.count > 0 ? StatusCellMargin : 0
                make.top.equalTo(contentLabel.snp_bottom).offset(offset)
            }
        }
    }
    override func setupUI() {
        super.setupUI()
        //配图信息
        pictureView.snp_makeConstraints { (make) -> Void in
            make.top.equalTo(contentLabel.snp_bottom).offset(StatusCellMargin)
            make.left.equalTo(contentLabel.snp_left)
            make.width.equalTo(300)
            make.height.equalTo(90)
        }
    }

}
